//
//  iShopAppDelegate.h
//  iShop
//
//  Created by svp on 17/12/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
#import "ActivityIndicatorView.h"
#import "WebRequest.h"

@interface iShopAppDelegate : NSObject <UIApplicationDelegate,CLLocationManagerDelegate,WebRequestDelegate> {
    
    UIWindow *window;
	UIToolbar *_toolbar;
	UINavigationController *_rootNavigationController;
	UIBarButtonItem *_homeButton;
	UIBarButtonItem *_promotionButton;
	UIBarButtonItem *_hobbiesButton;
	UIBarButtonItem *_searchButton;
	UIBarButtonItem *_cartButton;
	NSMutableArray *_toolbarItems;
	ActivityIndicatorView *indicator;
    
@private
    NSManagedObjectContext *managedObjectContext_;
    NSManagedObjectModel *managedObjectModel_;
    NSPersistentStoreCoordinator *persistentStoreCoordinator_;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) NSMutableArray *toolbarItems;
@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
@property (nonatomic, retain) IBOutlet UINavigationController *rootNavigationController;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *homeButton;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *promotionButton;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *hobbiesButton;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *searchButton;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *cartButton;

@property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
@property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (NSURL *)applicationDocumentsDirectory;
- (void)saveContext;

-(void) showLoginView;

-(void) startSpinner:(NSString*) text;
-(void) stopSpinner;

@end

